package com.sxjh.entity.result;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.time.LocalDateTime;

@Data
public class Finance3HgylcgrbbResult {

  @ApiModelProperty("物料名称")
  private String materialName;

  @ApiModelProperty("供应商")
  private String companyName;

  @ApiModelProperty("当日车数")
  private int plateNumber;

  @ApiModelProperty("当日原发")
  private BigDecimal netWeight;

  @ApiModelProperty("当日实收")
  private BigDecimal weighbridgeWeight;

  @ApiModelProperty("结算单价")
  private BigDecimal settlementPrice;

  @ApiModelProperty("金额")
  private BigDecimal amount ;

  @ApiModelProperty("运费单价")
  private BigDecimal freight;

  @ApiModelProperty("运费金额")
  private BigDecimal freightAmount;

  @ApiModelProperty("总金额")
  private BigDecimal money;

  @ApiModelProperty("平均价")
  private BigDecimal averagePrice ;

  @ApiModelProperty("供应商类型  1直供厂||2贸易商")
  private BigDecimal type ;

  @ApiModelProperty("供应商类型")
  private String typeStr ;

  public BigDecimal getNetWeight() {
    if("".equals(netWeight)||netWeight==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return netWeight;
  }

  public BigDecimal getWeighbridgeWeight() {
    if("".equals(weighbridgeWeight)||weighbridgeWeight==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return weighbridgeWeight;
  }

  public BigDecimal getSettlementPrice() {
    if("".equals(settlementPrice)||settlementPrice==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return settlementPrice;
  }

  public BigDecimal getAmount() {
    if("".equals(amount)||amount==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return amount;
  }

  public BigDecimal getFreight() {
    if("".equals(freight)||freight==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return freight;
  }

  public BigDecimal getFreightAmount() {
    if("".equals(freightAmount)||freightAmount==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return freightAmount;
  }

  public BigDecimal getMoney() {
    if("".equals(money)||money==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return money;
  }

  public BigDecimal getAveragePrice() {
    if("".equals(averagePrice)||averagePrice==null){
      return new BigDecimal(0);//去除该属性的前后空格并进行非空非null判断
    }
    return averagePrice;
  }
}